/*
Robotics object oriented package in C++
Copyright (C) 2008-2009  Matrix

This library is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
published by the Free Software Foundation; either version 2.1 of the
License, or (at your option) any later version.

This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston,  MA 02111-1307  USA
*/

#pragma once
#include <vector>

namespace GrabRobModel
{
	using namespace Robotic::Math;
	using namespace Robotic::Mechanism;


	/*!
	Class Chain
	Brief Virtual base Chain class.
	*/
	class GRABROB3RRR_API GrabRob_3_RRR: public Chain_DH
	{
	public:
		/*
		Constructor.
		Create no links by default, and dof is 0.
		*/
		GrabRob_3_RRR( );

		/*
		Destructor
		*/
		virtual ~GrabRob_3_RRR();

		/*
		Inverse calculation pose w.r.t base frame, from cartesian cartesian to joint space.
		Gets all links' joint value with endFrame.
		@param endFrame, desired end link's frame.
		@param retJointValues, returned all possible solution of joint values.
		@returns true, retJointValues returns all possible solutions; else no solution.
		*/
		virtual bool InverseKine_Pose(const Frame3& endFrame, std::vector<ColumnVector>& retJointValues)const;

		///*
		//Inverse calculation velocity w.r.t base frame, from cartesian cartesian to joint space.
		//Gets all links' joint velocity with jointValues, end frame linearVel and angleVel.
		//if returns true, retJointVels returns all possible solutions; else no solution.
		//@param jointValues, all joints' values.
		//@param endFrameVel, desired end link frame's velocity.
		//@param retJointVels, returned all possible solution of joint velocities.
		//@returns true, retJointVels returns all possible soutions; else no solution.
		//*/
		//virtual bool InverseKine_Vel(const ColumnVector& jointValues, const Velocity& endFrameVel, ColumnVector& retJointVels)const;

		///*
		//Inverse calculation acceleration w.r.t base frame, from cartesian space to joint space.
		//Gets all links' joint acceleration with jointValues, jointVels, end frame linearAcc and angleAcc.
		//@param jointValues, all joints' values.
		//@param jointVels, all joints' velocities.
		//@param endFrameAcc, desired end link frame's acceleration.
		//@param retJointAccs, returned all possible solution of joint acceleration.
		//@returns true, retJointAccs returns all possible solutions; else no solution.
		//*/
		//virtual bool InverseKine_Acc(const ColumnVector& jointValues, const ColumnVector& jointVels, const Acceleration& endFrameAcc, ColumnVector& retJointAccs)const;

	};
}